package com.example.demo.mapper;

import com.example.demo.client.vm.cssmqry.menu.MenuTreeVm;
import com.example.demo.web.rest.vm.MenuIdAndNameVm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * @Desc
 * @Author zhengmf
 * @Date 2019-12-23 9:46:35
 */
@Mapper
@Repository
public interface MenuMapper {
    List<MenuTreeVm> getParentMenuTree();

    /***
     * 根据菜单IDS获取菜单
     * @param menuIdList
     */
    List<MenuTreeVm> getMenuByIds(@Param(value = "menuIdList") Set<String> menuIdList);


    /***
     * 更新fullmenuId和parentId
     */
    void updateFullMenuIds(@Param(value = "fullMenuId") String fullMenuId,@Param(value = "pid") String pid,@Param(value = "id") String id);

    /***
     * 根据菜单IDS获取菜单
     */
    List<MenuIdAndNameVm> qryAllMenu();

    /***
     * 获取菜单树深度
     */
    Integer getMenuTreeDeep();

    /***
     * 根据menuid获取角色-菜单权限列表
     */
    List<Long> getRoleByMenuId(Long menuId);
}
